package com.itheima.mq;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

//@Component //对direct进行测试，队列设定了类名
public class SpringRabbitDirectListener {
    @RabbitListener(queues = "direct.queue1")
    public void listenerQueue1(String message) {
        System.out.println("queue1接收到的消息是：" + message);
    }
    @RabbitListener(queues = "direct.queue2")
    public void listenerQueue2(String message) {
        System.out.println("queue2接收到消息是：" + message);
    }
}
